﻿@model IEnumerable<Alumnos.Models.Alumno>

@{
    ViewBag.Title = "Listado de alumno";
}

<h1>Listado de alumnos</h1>

<form class="form-inline pull-right" role="form" method="get" action="@Url.Action("Index")">
    <div class="form-group">
        <div class="input-group">
            <input type="text" class="form-control" name="q" id="busqueda" placeholder="Buscar..." />
            <span class="input-group-btn">
                <button class="btn" type="submit"><span class="glyphicon glyphicon-search"></span></button>
            </span>            
        </div>
    </div>
</form>

<table class="table table-striped table-hover">
    <thead>
        <tr>
            <th>Legajo</th>
            <th>Nombre</th>
            <th>Apellido</th>
            <th>Acciones</th>
        </tr>
    </thead>
    <tbody>
        @foreach (Alumnos.Models.Alumno cadaAlumno in Model)
        {
            <tr>
                <td>@cadaAlumno.Legajo</td>
                <td>@cadaAlumno.Nombre</td>
                <td>@cadaAlumno.Apellido</td>
                <td>
                    @Html.ActionLink("Editar", "Editar", new { id = cadaAlumno.Legajo })
                    @Html.ActionLink("Borrar", "Borrar", new { id = cadaAlumno.Legajo })
                </td>
            </tr>
        }
    </tbody>
</table>
<a href="@Url.Action("Agregar", "Alumno")">Agregar nuevo alumno</a>
